import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
    routes: [
        {
            path: '/login',
            name: '登录页',
            component: () => import('@/pages/login')
        },
        {
            path: '*',
            name: '404',
            component: () => import('@/pages/exception/404'),
        },
        {
            path: '/403',
            name: '403',
            component: () => import('@/pages/exception/403'),
        },
        {
            path: '/',
            name: '首页',
            component: TabsView,
            redirect: '/login',
            children: [
                {
                    path: 'workplace',
                    name: '工作台',
                    meta: {
                        icon: 'dashboard'
                    },
                    component: () => import('@/pages/list/menu/dashboard/WorkPlace.vue'),
                },
                {
                    path: 'goods',
                    name: '帖子管理',
                    meta: {
                        icon: 'shop'
                    },
                    component: PageView,
                    children: [
                        {
                            path: 'goods/goodsManage',
                            name: '发帖列表',
                            meta: {
                                icon: 'shopping'
                            },
                            component: () => import('@/pages/list/menu/goods/goodsManage.vue'),
                        },
                        {
                            path: 'goods/shopValuate',
                            name: '贴子',
                            meta: {
                                icon: 'message'
                            },
                            component: () => import('@/pages/list/menu/goods/shopValuate.vue'),
                        }
                    ]
                },
                {
                    path: 'user',
                    name: '用户管理',
                    meta: {
                        icon: 'user'
                    },
                    component: PageView,
                    children: [
                        {
                            path: '/user/userManage',
                            name: '用户列表',
                            meta: {
                                icon: 'user'
                            },
                            component: () => import('@/pages/list/menu/user/userManage.vue'),
                        }
                    ]
                },
                {
                    path: 'order',
                    name: '举报处理',
                    meta: {
                        icon: 'warning'
                    },
                    component: PageView,
                    children: [
                        {
                            path: '/order/orderManage',
                            name: '订单列表',
                            meta: {
                                icon: 'unordered-list'
                            },
                            component: () => import('@/pages/list/menu/order/orderManage.vue'),
                        },
                        {
                            path: '/order/order-after',
                            name: '售后订单',
                            meta: {
                                icon: 'property-safety'
                            },
                            component: () => import('@/pages/list/menu/order/order-after.vue'),
                        }
                    ]
                },
                {
                    path: 'marking',
                    name: '排行榜管理',
                    meta: {
                        icon: 'appstore'
                    },
                    component: BlankView,
                    children: [
                        {
                            path: 'marking/coupon',
                            name: '优惠卷',
                            meta: {
                                icon: 'gift'
                            },
                            component: PageView,
                            children: [
                                {
                                    path: 'couponManage',
                                    name: '优惠卷列表',
                                    meta: {
                                        icon: 'unordered-list'
                                    },
                                    component: () => import('@/pages/list/menu/marking/coupon/couponManage.vue'),
                                },
                                {
                                    path: 'couponRecord',
                                    name: '领取记录',
                                    meta: {
                                        icon: 'reconciliation'
                                    },
                                    component: () => import('@/pages/list/menu/marking/coupon/couponRecord.vue'),
                                },
                            ]
                        }
                    ]
                },
                {
                    path: 'power',
                    name: '权限管理',
                    meta: {
                        icon: 'lock'
                    },
                    component: PageView,
                    children: [
                        {
                            path: '/power/admin',
                            name: '管理员',
                            meta: {
                                icon: 'user',
                            },
                            component: () => import('@/pages/list/menu/power/admin.vue'),
                        },
                        {
                            path: '/power/powerManage',
                            name: '角色管理',
                            meta: {
                                icon: 'woman'
                            },
                            component: () => import('@/pages/list/menu/power/powerManage.vue'),
                        }
                    ]
                },
                 {
                    path: 'CustomerService',
                    name: '小助手',
                    meta: {
                        icon: 'user'
                    },
                    component: PageView,
                    children: [
                        {
                            path: '/CustomerService/CustomerServiceDepartment',
                            name: '客服',
                            meta: {
                                icon: 'user',
                            },
                            component: () => import('@/pages/list/menu/CustomerService/CustomerServiceDepartment.vue'),
                        }
                    ]
                },
            ]
        },
    ]
}

export default options
